home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CD-ROM Today - The Disc! 5
/
CD-ROM Today - The Disc (Issue 5)(November 1994).ISO
/
mac
/
Mac shareware
/
Education
/
RLaB
/
help
/
WHILE
< prev
next >
Wrap
Text File
|
1994-09-21
|
532b
|
26 lines
WHILE:
The RLaB while statement is similar to the C while statement.
Example:
> i=1;
> while(i<10)
{
a[i] = 1.3*i;
i++;
}
> a
a =
matrix columns 1 thru 5
1.3 2.6 3.9 5.2 6.5
matrix columns 6 thru 9
7.8 9.1 10.4 11.7
while(0) { "this will never be executed" }
If the conditional evaluates to zero then the loop is not
executed, if it evaluates to anything other than zero it will
be executed until the condition is zero.